<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: Origami::Field</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">Origami::Field</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/origami/acroform_rb.html">
                origami/acroform.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000375">included</a>&nbsp;&nbsp;
      <a href="#M000380">onCalculate</a>&nbsp;&nbsp;
      <a href="#M000378">onFormat</a>&nbsp;&nbsp;
      <a href="#M000377">onKeyStroke</a>&nbsp;&nbsp;
      <a href="#M000379">onValidate</a>&nbsp;&nbsp;
      <a href="#M000376">pre_build</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">

    <div id="class-list">
      <h3 class="section-bar">Classes and Modules</h3>

      Module <a href="Field/Flags.html" class="link">Origami::Field::Flags</a><br />
Module <a href="Field/TextAlign.html" class="link">Origami::Field::TextAlign</a><br />
Module <a href="Field/Type.html" class="link">Origami::Field::Type</a><br />
Class <a href="Field/Subform.html" class="link">Origami::Field::Subform</a><br />

    </div>

    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">T</td>
          <td>=</td>
          <td class="context-item-value">&quot;undef#{::Array.new(5) {(0x30 + rand(10)).chr}.join}&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">K</td>
          <td>=</td>
          <td class="context-item-value">action</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">F</td>
          <td>=</td>
          <td class="context-item-value">action</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">V</td>
          <td>=</td>
          <td class="context-item-value">action</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">C</td>
          <td>=</td>
          <td class="context-item-value">action</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000375" class="method-detail">
        <a name="M000375"></a>

        <div class="method-heading">
          <a href="#M000375" class="method-signature">
          <span class="method-name">included</span><span class="method-args">(receiver)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000375-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000375-source">
<pre>
     <span class="ruby-comment cmt"># File origami/acroform.rb, line 148</span>
148:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">receiver</span>)
149: 
150:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:FT</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Name</span>, <span class="ruby-identifier">:Default</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">TEXT</span>, <span class="ruby-identifier">:Required</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>
151:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:Parent</span>, <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Dictionary</span>
152:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:Kids</span>,   <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Array</span>
153:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:T</span>,      <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">String</span>
154:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:TU</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">String</span>, <span class="ruby-identifier">:Version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;1.3&quot;</span>
155:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:TM</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">String</span>, <span class="ruby-identifier">:Version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;1.3&quot;</span>
156:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:Ff</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Integer</span>, <span class="ruby-identifier">:Default</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
157:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:V</span>,      <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Object</span>
158:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:DV</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Object</span>
159:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:AA</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Dictionary</span>, <span class="ruby-identifier">:Version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;1.2&quot;</span>
160: 
161:       <span class="ruby-comment cmt"># Variable text fields</span>
162:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:DA</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">String</span>, <span class="ruby-identifier">:Default</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/F1 10 Tf 0 g&quot;</span>, <span class="ruby-identifier">:Required</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>
163:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:Q</span>,      <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Integer</span>, <span class="ruby-identifier">:Default</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">TextAlign</span><span class="ruby-operator">::</span><span class="ruby-constant">LEFT</span>
164:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:DS</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ByteString</span>, <span class="ruby-identifier">:Version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;1.5&quot;</span>
165:       <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">field</span>   <span class="ruby-identifier">:RV</span>,     <span class="ruby-identifier">:Type</span> =<span class="ruby-operator">&gt;</span> [ <span class="ruby-constant">String</span>, <span class="ruby-constant">Stream</span> ], <span class="ruby-identifier">:Version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;1.5&quot;</span>
166:         
167:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000380" class="method-detail">
        <a name="M000380"></a>

        <div class="method-heading">
          <a href="#M000380" class="method-signature">
          <span class="method-name">onCalculate</span><span class="method-args">(action)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000380-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000380-source">
<pre>
     <span class="ruby-comment cmt"># File origami/acroform.rb, line 211</span>
211:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onCalculate</span>(<span class="ruby-identifier">action</span>)
212:     
213:       <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Action</span>)
214:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;An Action object must be passed.&quot;</span>
215:       <span class="ruby-keyword kw">end</span>
216:       
217:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">AdditionalActions</span>.<span class="ruby-identifier">new</span>
218:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span>.<span class="ruby-constant">C</span> = <span class="ruby-identifier">action</span>
219:         
220:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000378" class="method-detail">
        <a name="M000378"></a>

        <div class="method-heading">
          <a href="#M000378" class="method-signature">
          <span class="method-name">onFormat</span><span class="method-args">(action)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000378-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000378-source">
<pre>
     <span class="ruby-comment cmt"># File origami/acroform.rb, line 189</span>
189:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onFormat</span>(<span class="ruby-identifier">action</span>)
190:     
191:       <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Action</span>)
192:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;An Action object must be passed.&quot;</span>
193:       <span class="ruby-keyword kw">end</span>
194:       
195:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">AdditionalActions</span>.<span class="ruby-identifier">new</span>
196:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span>.<span class="ruby-constant">F</span> = <span class="ruby-identifier">action</span>
197:         
198:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000377" class="method-detail">
        <a name="M000377"></a>

        <div class="method-heading">
          <a href="#M000377" class="method-signature">
          <span class="method-name">onKeyStroke</span><span class="method-args">(action)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000377-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000377-source">
<pre>
     <span class="ruby-comment cmt"># File origami/acroform.rb, line 178</span>
178:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onKeyStroke</span>(<span class="ruby-identifier">action</span>)
179:     
180:       <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Action</span>)
181:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;An Action object must be passed.&quot;</span>
182:       <span class="ruby-keyword kw">end</span>
183:       
184:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">AdditionalActions</span>.<span class="ruby-identifier">new</span>
185:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span>.<span class="ruby-constant">K</span> = <span class="ruby-identifier">action</span>
186:         
187:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000379" class="method-detail">
        <a name="M000379"></a>

        <div class="method-heading">
          <a href="#M000379" class="method-signature">
          <span class="method-name">onValidate</span><span class="method-args">(action)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000379-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000379-source">
<pre>
     <span class="ruby-comment cmt"># File origami/acroform.rb, line 200</span>
200:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onValidate</span>(<span class="ruby-identifier">action</span>)
201:     
202:       <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Action</span>)
203:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;An Action object must be passed.&quot;</span>
204:       <span class="ruby-keyword kw">end</span>
205:       
206:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">AdditionalActions</span>.<span class="ruby-identifier">new</span>
207:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span>.<span class="ruby-constant">V</span> = <span class="ruby-identifier">action</span>
208:         
209:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000376" class="method-detail">
        <a name="M000376"></a>

        <div class="method-heading">
          <a href="#M000376" class="method-signature">
          <span class="method-name">pre_build</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000376-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000376-source">
<pre>
     <span class="ruby-comment cmt"># File origami/acroform.rb, line 169</span>
169:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre_build</span>
170:       
171:       <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">T</span>
172:         <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">T</span> = <span class="ruby-node">&quot;undef#{::Array.new(5) {(0x30 + rand(10)).chr}.join}&quot;</span>
173:       <span class="ruby-keyword kw">end</span>
174:       
175:       <span class="ruby-keyword kw">super</span>
176:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>